﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ZoomAtMouse
{
    public partial class OptionsControl : UserControl
    {
        public OptionsControl()
        {
            InitializeComponent();
            chkScroll.Checked = Settings.ScrollOverrideEnabled;
            numScroll.Value = Settings.ScrollOverridePercentage;
        }

        private void chkScroll_CheckedChanged(object sender, EventArgs e)
        {
            Settings.ScrollOverrideEnabled = chkScroll.Checked;
            numScroll.Enabled = chkScroll.Checked;
        }

        private void numScroll_ValueChanged(object sender, EventArgs e)
        {
            Settings.ScrollOverridePercentage = numScroll.Value; 
        }

        private void btnHelpScrollOverride_Click(object sender, EventArgs e)
        {
            MessageBox.Show("By default, scrolling with the mouse always scrolls by a fixed number of lines, specified by the operating system (typically 3 lines).  Scrolling by a fixed number of lines while zoomed out is not useful.  This feature will allow you to always scroll by a percentage of the visible file for all zoom levels instead. ");
        }
    }
}
